#!/usr/bin/perl

my %fam = (
"ivan" => "draga",
"john" => "smith",
"rembo" => undef,
"boris" => "britva",);

while () {
print "enter name \n";
chomp ($name = <STDIN>);
if (exists ($fam{$name})) {
print "family is $fam{$name}\n";
  }
}
